<?php

use yii\widgets\DetailView;
use backend\models\Image;

/* @var $this yii\web\View */
/* @var $model backend\models\Taozhuang */
?>
<div class="taozhuang-view">
    <?= DetailView::widget([
        'model' => $model,
        'attributes' => [
            'sid',
            'name',
            'tips',
            'price_base',
            'price_custom',
            //'related_list',
    		[
	    		'attribute'=>'app_return',
	    		$_arr = array('0'=>'编辑','1'=>'上架','2'=>'下架','3'=>'删除'),
	    		'value'=>$_arr[$model->app_return]
    		],
    		[
    			'attribute'=>'pos_type',
    			$_arr = array('0'=>'左下角','1'=>'左上角'),
    			'value'=>$_arr[$model->pos_type]
    		],
    		[
    			'attribute' => 'img_small_id',
    			'value'=>!empty($model->img_small_id)?"<img width='10%' src='".Image::show_image($model->img_small_id)."'>":'无图','format' => 'raw',
    		],
           	//'img_small_id',
            //'img_thumb_id',
            //'img_url_id:url',
           // 'space_id',
           'spaceName.name',
    		[
	    		'attribute'=>'top_time',
	    		'value'=>!empty($model->top_time)?date('Y-m-d H:i:s',$model->top_time):'无',
    		],
        ],
    ]) ?>

</div>
<div style="">
<a href="<?= $model->QRcode ?>" download="<?= $model->sid.'.png'?>"><img width='50%' id='img1' src="<?=$model->QRcode ?>" /></a>
</div>